user defined function in vba excel. There are any references about user defined function in vba excel in here. you can look below.